package async.runAsync;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

public class Demo1 {
    public static void main(String[] args) {
        CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
            try {
                TimeUnit.SECONDS.sleep(3);
                System.out.println("child run");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        System.out.println("main end");
    }
}
